package org.uim.cricket.db.impl;

import java.sql.SQLException;
import java.util.HashMap;

public class FetchAllContinents extends DBDataSetResultQuery {

	private HashMap<String, Integer> map = null;
	
	public void fetch() throws SQLException {
		String[][] data = super.result("CALL sp_SelectAll_Continents();", 2);
		if (data == null) return;
		
		map = new HashMap<String, Integer>();
		for (int i=0; i<data.length; i++) {
			if (data[i][1] == null || data[i][1].length() == 0) continue;
			
			map.put(data[i][1], Integer.parseInt(data[i][0]));
		}
	}
	
	public HashMap<String, Integer> getMap() {
		return map;
	}
	
	public void setMap(HashMap<String, Integer> map) {
		this.map = map;
	}
	
}
